.game-container {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  padding: 2rem;
  background-color: #121212;
  color: white;
  position: relative;
}

.game-header {
  display: flex;
  align-items: center;
  margin-bottom: 2rem;
  position: relative;
}

.back-button {
  position: absolute;
  left: 0;
  padding: 0.75rem 1.5rem;
  background-color: #333;
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 1.2rem;
  transition: background-color 0.3s;

  &:hover, &:focus {
    background-color: #555;
    outline: 3px solid #4a90e2;
  }
}

.game-title {
  width: 100%;
  text-align: center;
  font-size: 2.5rem;
  margin: 0;
}

.game-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex-grow: 1;
}

// 移除原来的顶部积分显示样式

.player-name {
  font-size: 1.2rem;
  font-weight: bold;
  margin-bottom: 0.5rem;
  text-align: center;
  display: flex;
  justify-content: center;
  align-items: center;
}

.player-icon {
  font-size: 1.8rem;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

.fa-male {
  color: #4a90e2;
}

.fa-female {
  color: #e84393;
}

.score {
  font-size: 1.8rem;
  font-weight: bold;
  color: #4a90e2;
}

.vs {
  font-size: 2rem;
  font-weight: bold;
  color: #4a90e2;
  flex-shrink: 0;
  text-shadow: 0 0 10px rgba(74, 144, 226, 0.5);
}

.riddle-layout {
  display: flex;
  gap: 1.5rem;
  width: 100%;
  max-width: 1400px;
  position: relative;
  align-items: flex-start;
}

.riddle-card {
  background: linear-gradient(145deg, #1a1a1a, #2d2d2d);
  border-radius: 20px;
  padding: 2.5rem;
  flex: 6;
  height: 600px;
  box-shadow: 
    0 20px 40px rgba(0, 0, 0, 0.6),
    inset 0 1px 0 rgba(255, 255, 255, 0.1),
    0 0 0 1px rgba(74, 144, 226, 0.2);
  border: 2px solid transparent;
  background-clip: padding-box;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  position: relative;
  
  &::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 20px;
    background: linear-gradient(145deg, rgba(74, 144, 226, 0.1), rgba(74, 144, 226, 0.05));
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
  }
  
  &:hover {
    transform: translateY(-2px);
    box-shadow: 
      0 25px 50px rgba(0, 0, 0, 0.8),
      inset 0 1px 0 rgba(255, 255, 255, 0.15),
      0 0 0 2px rgba(74, 144, 226, 0.4),
      0 0 20px rgba(74, 144, 226, 0.2);
    
    &::before {
      opacity: 1;
    }
  }
  
  &.timer-countdown {
    position: relative;
    border: 4px solid transparent;
    background: linear-gradient(#2a2a2a, #2a2a2a) padding-box,
                conic-gradient(from -90deg, 
                  #4a90e2 0deg, 
                  #4a90e2 calc(var(--timer-progress) * 360deg), 
                  transparent calc(var(--timer-progress) * 360deg), 
                  transparent 360deg
                ) border-box;
    border-radius: 16px;
    
    &::before {
      content: '';
      position: absolute;
      top: -8px;
      left: -8px;
      right: -8px;
      bottom: -8px;
      border-radius: 20px;
      background: conic-gradient(from -90deg, 
        rgba(74, 144, 226, 0.6) 0deg, 
        rgba(74, 144, 226, 0.6) calc(var(--timer-progress) * 360deg), 
        transparent calc(var(--timer-progress) * 360deg), 
        transparent 360deg
      );
      z-index: -1;
      filter: blur(4px);
    }
  }
}



.riddle-question {
  font-size: 2rem;
  margin-bottom: 2rem;
  text-align: center;
}

.riddle-hint {
  background-color: rgba(74, 144, 226, 0.1);
  border: 1px solid rgba(74, 144, 226, 0.3);
  border-radius: 8px;
  padding: 1rem;
  margin: 1rem 0;
  min-height: 80px;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  
  .hint-label {
    color: #4a90e2;
    font-weight: 600;
    font-size: 0.9rem;
  }
  
  .hint-content {
    color: #4a90e2;
    font-size: 0.9rem;
    animation: fadeIn 0.3s ease;
  }
  
  .hint-placeholder {
    color: rgba(74, 144, 226, 0.6);
    font-size: 0.85rem;
    font-style: italic;
  }
  
  @keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
  }
}

.options-container {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.option-button {
  padding: 1.5rem;
  background-color: #333;
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 1.2rem;
  transition: all 0.3s;
  text-align: center;

  &:hover, &:focus {
    background-color: #444;
    transform: translateY(-5px);
    outline: 3px solid #4a90e2;
  }

  &.selected {
    background-color: #4a90e2;
  }

  &.correct {
    background-color: #4caf50;
  }

  &.incorrect {
    background-color: #f44336;
  }
}

.riddle-qa {
  margin-bottom: 2rem;
}

.qa-input {
  width: 100%;
  padding: 1rem;
  font-size: 1.2rem;
  background-color: #333;
  border: 2px solid #4a90e2;
  border-radius: 8px;
  color: white;
  margin-bottom: 1rem;
}

.controls {
  display: flex;
  justify-content: space-between;
  margin-top: 2rem;
}

.control-button {
  padding: 1rem 2rem;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 1.2rem;
  transition: background-color 0.3s;
}



.next-button {
  background-color: #4a90e2;
  color: white;

  &:hover, &:focus {
    background-color: #3a80d2;
    outline: 3px solid #4a90e2;
  }

  &:disabled {
    opacity: 0.5;
    cursor: not-allowed;
  }
}



.timer-sidebar {
  flex: 4;
  height: 600px;
  background: linear-gradient(145deg, #1a1a1a, #2d2d2d);
  border-radius: 20px;
  padding: 2rem;
  box-shadow: 
    0 20px 40px rgba(0, 0, 0, 0.6),
    inset 0 1px 0 rgba(255, 255, 255, 0.1),
    0 0 0 1px rgba(74, 144, 226, 0.2);
  border: 2px solid transparent;
  background-clip: padding-box;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  position: relative;
  
  &::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 20px;
    background: linear-gradient(145deg, rgba(74, 144, 226, 0.05), rgba(74, 144, 226, 0.02));
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
  }
  
  &:hover {
    transform: translateY(-2px);
    box-shadow: 
      0 25px 50px rgba(0, 0, 0, 0.8),
      inset 0 1px 0 rgba(255, 255, 255, 0.15),
      0 0 0 2px rgba(74, 144, 226, 0.3),
      0 0 15px rgba(74, 144, 226, 0.15);
    
    &::before {
      opacity: 1;
    }
  }
}

// 右侧积分对比样式
.players-score-sidebar {
  background: linear-gradient(135deg, rgba(26, 26, 26, 0.9), rgba(45, 45, 45, 0.9));
  border-radius: 16px;
  padding: 1.5rem;
  border: 1px solid rgba(74, 144, 226, 0.3);
  box-shadow: 
    inset 0 1px 0 rgba(255, 255, 255, 0.1),
    0 4px 12px rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(10px);
  position: relative;
  
  &::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(74, 144, 226, 0.08), rgba(74, 144, 226, 0.03));
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
  }
  
  &:hover::before {
    opacity: 1;
  }
}

.score-title {
  text-align: center;
  font-size: 1.1rem;
  font-weight: bold;
  color: #4a90e2;
  margin-bottom: 1rem;
}

.players-score-container {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.player-score-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.2rem;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.03));
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  
  &::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(74, 144, 226, 0.1), transparent);
    transition: left 0.6s ease;
  }
  
  &.active {
    background: linear-gradient(135deg, rgba(74, 144, 226, 0.25), rgba(74, 144, 226, 0.15));
    border-color: rgba(74, 144, 226, 0.5);
    box-shadow: 
      0 0 20px rgba(74, 144, 226, 0.4),
      inset 0 1px 0 rgba(255, 255, 255, 0.2);
    transform: scale(1.03) translateY(-1px);
    
    &::before {
      left: 100%;
    }
  }
  
  &:hover:not(.active) {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.06));
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-1px);
  }
}

.player-info {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.player-label {
  font-size: 0.9rem;
  font-weight: 500;
}

.score-value {
  font-size: 1.4rem;
  font-weight: bold;
  color: #4a90e2;
  text-shadow: 0 0 8px rgba(74, 144, 226, 0.3);
}

.vs-divider {
  text-align: center;
  font-size: 1rem;
  font-weight: bold;
  color: #4a90e2;
  opacity: 0.7;
}

// 统计详情样式
.stats-detail {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.5rem;
  flex-wrap: wrap;
}

.stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0.4rem 0.6rem;
  border-radius: 8px;
  font-size: 0.75rem;
  min-width: 45px;
  border: 1px solid transparent;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  
  &::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 8px;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
  }
  
  &:hover::before {
    opacity: 1;
  }
  
  &.correct {
    background: linear-gradient(135deg, rgba(76, 175, 80, 0.25), rgba(76, 175, 80, 0.15));
    color: #66bb6a;
    border-color: rgba(76, 175, 80, 0.3);
    box-shadow: 0 2px 8px rgba(76, 175, 80, 0.2);
    
    &::before {
      background: linear-gradient(135deg, rgba(76, 175, 80, 0.1), rgba(76, 175, 80, 0.05));
    }
  }
  
  &.wrong {
    background: linear-gradient(135deg, rgba(244, 67, 54, 0.25), rgba(244, 67, 54, 0.15));
    color: #ef5350;
    border-color: rgba(244, 67, 54, 0.3);
    box-shadow: 0 2px 8px rgba(244, 67, 54, 0.2);
    
    &::before {
      background: linear-gradient(135deg, rgba(244, 67, 54, 0.1), rgba(244, 67, 54, 0.05));
    }
  }
  
  &.timeout {
    background: linear-gradient(135deg, rgba(255, 152, 0, 0.25), rgba(255, 152, 0, 0.15));
    color: #ffa726;
    border-color: rgba(255, 152, 0, 0.3);
    box-shadow: 0 2px 8px rgba(255, 152, 0, 0.2);
    
    &::before {
      background: linear-gradient(135deg, rgba(255, 152, 0, 0.1), rgba(255, 152, 0, 0.05));
    }
  }
}

.stat-label {
  font-weight: 500;
  margin-bottom: 0.1rem;
}

.stat-value {
  font-weight: bold;
  font-size: 0.9rem;
}

.timer-display {
  text-align: center;
}



.timer-value {
  font-size: 3rem;
  font-weight: bold;
  color: #4a90e2;
  margin-bottom: 1.5rem;
  transition: color 0.3s ease;
  text-shadow: 0 0 10px rgba(74, 144, 226, 0.3);

  &.warning {
    color: #f39c12;
    animation: pulse 1s infinite;
    text-shadow: 0 0 10px rgba(243, 156, 18, 0.5);
  }

  &.danger {
    color: #e74c3c;
    animation: pulse 0.5s infinite;
    text-shadow: 0 0 10px rgba(231, 76, 60, 0.5);
  }
}

.timer-progress {
  width: 100%;
  height: 8px;
  background-color: #444;
  border-radius: 4px;
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  background: linear-gradient(90deg, #e74c3c 0%, #f39c12 50%, #4a90e2 100%);
  transition: width 1s linear;
  border-radius: 4px;
}

.player-turn {
  text-align: center;
}

.turn-label {
  font-size: 1rem;
  color: #aaa;
  margin-bottom: 0.5rem;
}

.turn-value {
  font-size: 1.5rem;
  font-weight: bold;
  color: #4a90e2;
}

.next-button-container {
  margin-top: 2rem;
  display: flex;
  justify-content: center;
  
  .next-button {
    background: linear-gradient(135deg, #4a90e2, #357abd);
    color: white;
    border: none;
    border-radius: 12px;
    padding: 1rem 2rem;
    font-size: 1.2rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(74, 144, 226, 0.3);
    text-transform: uppercase;
    letter-spacing: 1px;
    
    &:hover {
      transform: translateY(-2px);
      box-shadow: 0 6px 20px rgba(74, 144, 226, 0.4);
      background: linear-gradient(135deg, #357abd, #2c5aa0);
    }
    
    &:active {
      transform: translateY(0);
      box-shadow: 0 2px 10px rgba(74, 144, 226, 0.3);
    }
  }
}

// 底部回合信息样式
.bottom-round-info {
  display: flex;
  justify-content: center;
  margin-top: 2rem;
  padding: 1rem 0;
}

.round-display {
  background-color: rgba(74, 144, 226, 0.2);
  border: 1px solid rgba(74, 144, 226, 0.3);
  border-radius: 20px;
  padding: 0.8rem 2rem;
  font-size: 1.2rem;
  font-weight: bold;
  color: #4a90e2;
  text-shadow: 0 0 8px rgba(74, 144, 226, 0.3);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  transition: all 0.3s ease;
  
  &:hover {
    background-color: rgba(74, 144, 226, 0.3);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
    transform: translateY(-2px);
  }
}

@keyframes pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.05); }
  100% { transform: scale(1); }
}

.game-over {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  text-align: center;
  background-color: #2a2a2a;
  border-radius: 16px;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
  max-width: 800px;
  margin: 0 auto;
  width: 100%;

  h2 {
    font-size: 2.5rem;
    margin-bottom: 2rem;
    color: #4a90e2;
  }
}

.final-scores {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 2rem;
  gap: 2rem;
}

.final-score {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1.5rem 2rem;
  background-color: #333;
  border-radius: 8px;
}

.winner-announcement {
  margin-bottom: 2rem;

  h3 {
    font-size: 2rem;
    color: #f1c40f;
  }
}

.restart-button {
  font-size: 1.5rem;
  padding: 1rem 2rem;
  background-color: #2ecc71;
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background-color 0.3s;

  &:hover {
    background-color: #27ae60;
  }
}

.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.modal-content {
  background-color: #2a2a2a;
  border-radius: 16px;
  padding: 2rem;
  max-width: 500px;
  width: 90%;
  text-align: center;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);

  h3 {
    font-size: 1.8rem;
    color: #4a90e2;
    margin-bottom: 1.5rem;
  }

  p {
    font-size: 1.2rem;
    color: #ddd;
    margin-bottom: 2rem;
    line-height: 1.5;
  }
}

.modal-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
}

.cancel-button, .confirm-button {
  padding: 1rem 2rem;
  border: none;
  border-radius: 8px;
  font-size: 1.2rem;
  cursor: pointer;
  transition: background-color 0.3s;
}

.cancel-button {
  background-color: #6c757d;
  color: white;

  &:hover {
    background-color: #5a6268;
  }
}

.confirm-button {
  background-color: #e74c3c;
  color: white;

  &:hover {
    background-color: #c0392b;
  }
}

@media (max-width: 768px) {
  .options-container {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .riddle-layout {
    flex-direction: column;
    gap: 1rem;
  }

  .timer-sidebar {
    width: 100%;
    padding: 1rem;
    height: auto;
    order: -1;
    
    .timer-value {
      font-size: 2.5rem;
    }
  }
  
  .players-score-sidebar {
    padding: 1rem;
  }
  
  .score-title {
    font-size: 1rem;
  }
  
  .player-score-item {
    padding: 0.6rem 0.8rem;
  }
  
  .score-value {
    font-size: 1.2rem;
  }
  
  .stats-detail {
    gap: 0.3rem;
  }
  
  .stat-item {
    padding: 0.2rem 0.3rem;
    font-size: 0.65rem;
    min-width: 30px;
  }
  
  .stat-value {
    font-size: 0.8rem;
  }

  .riddle-card {
    padding: 1.5rem;
    height: auto;
  }
  
  .riddle-hint {
    min-height: 60px;
    padding: 0.8rem;
    
    .hint-label {
      font-size: 0.8rem;
    }
    
    .hint-content {
      font-size: 0.8rem;
    }
    
    .hint-placeholder {
      font-size: 0.75rem;
    }
  }

  .final-scores {
    flex-direction: column;
  }
  
  .bottom-round-info {
    margin-top: 1.5rem;
    padding: 0.8rem 0;
  }
  
  .round-display {
    padding: 0.6rem 1.5rem;
    font-size: 1rem;
  }
}

@media (max-width: 480px) {
  .game-container {
    padding: 1rem;
  }

  .game-title {
    font-size: 2rem;
  }

  .riddle-question {
    font-size: 1.5rem;
  }

  .option-button {
    padding: 1rem;
    font-size: 1rem;
  }

  .control-button {
    padding: 0.8rem 1.5rem;
    font-size: 1rem;
  }
}